﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

  <CustomActionGroup Id="InfoSystems" Location="Microsoft.SharePoint.SiteSettings" Title="InfoSystems" Sequence="100" ImageUrl="_layouts/images/InfoSystems/InfoSystems_48X48.png" />
  
  <CustomAction Id="ManageUserRedirection" GroupId="InfoSystems" Location="Microsoft.SharePoint.SiteSettings" Sequence="1000" Title="Manage User Redirection" RequireSiteAdministrator="TRUE" >
    <UrlAction Url="~sitecollection/_layouts/InfoSystems/RedirectUsers.aspx" />
  </CustomAction>

  <Field ID="{04DC682E-F36D-48D3-A958-0FF699921F7F}"
       Name="SharePointGroup"
       Type="Text"
       DisplayName="SharePoint Group" 
       Description="Enter a valid SharePoint User Group."
       Required="TRUE">
  </Field>
  <Field ID="{5F86CF95-31A3-48FE-83AD-F74D26C514C5}"
         Name="LandingPageURL"
         Type="Text"
         DisplayName="Landing Page URL" 
         Description="Enter a relative URL to the page this group should be redirected to. E.G. '/SubSite/LaningPage.aspx'"
         Required="TRUE">
  </Field>

  <ContentType
       ID="0x010043FD63E76C4444D086DFF17E0E8F2C53"
       Name="User Mapping"
       Group="Custom Content Type"
       Inherits="FALSE"
       Hidden="FALSE"
       ReadOnly="FALSE"
       Sealed="FALSE"
       Description="User Mapping"
       Version="0">
    <FieldRefs>
      <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Hidden="TRUE" Required="FALSE" ShowInDisplayForm="FALSE" ShowInNewForm="FALSE" ShowInEditForm="FALSE" />
      <FieldRef ID="{04DC682E-F36D-48D3-A958-0FF699921F7F}" Required="TRUE"/>
      <FieldRef ID="{5F86CF95-31A3-48FE-83AD-F74D26C514C5}" Required="TRUE"/>
    </FieldRefs>

  </ContentType>
    <!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List Definition project item, an error will occur when the project is run. -->
    <ListTemplate
        Name="Redirect User List"
        Type="10001"
        BaseType="0"
        AllowDeletion="TRUE"
        OnQuickLaunch="FALSE"
        SecurityBits="11"
        Sequence="410"
        DisplayName="User Redirect"
        Description="List used to specify how users should be redirect by the [Redirect User] web part."
        Image="/_layouts/images/itgen.png"/>
</Elements>
